#ifndef EVENT_GENERATOR_H
#define EVENT_GENERATOR_H


#include "KeyboardEvent.h"
#include "MouseEvent.h"
#include <list>

class EventProcessor
{
    std::list< Event* > m_eventGarbage;
    
public:
    
    EventProcessor();
    
    ~EventProcessor();
    
    
    /**
     * Notifies the Event Generator of a new event occurred.
     * 
     * @param event: an SDL event.
     */
    
    Event* Process(const SDL_Event &event);
    
    
    /**
     * Disposes all produced events.
     */
    
    void DisposeEvents( );

private:
    
    
    /**
     * Creates a mouse event based on an SDL_Event and enqueues it.
     */
    
    MouseEvent* ProcessMouseEvent(const SDL_Event &event);
    
    
    /**
     * Creates a keyboard event based on an SDL_Event and enqueues it.
     */
    
    KeyboardEvent* ProcessKeyboardEvent(const SDL_Event &event);
};

#endif